package service.AlumniManagement;

import entity.Alumni;
import entity.AlumniComment;
import mapper.AlumniManagement.AlumniMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;

@Service
public class AlumniService {

    @Autowired
    private AlumniMapper alumniMapper;

    public List<LinkedHashMap<String,Object>> showAlumni(String phoneNumber){
        return alumniMapper.showAlumni(phoneNumber);
    }

    public LinkedHashMap<String,Object> showOne_alumni(String AlumniId){
        return alumniMapper.showOne_alumni(AlumniId);
    }

    public boolean addAlumni(Alumni alumni){
        return alumniMapper.addAlumni(alumni) == 1;
    }

    public boolean addAlumniComment(AlumniComment alumniComment){
        return alumniMapper.addAlumniComment(alumniComment) == 1;
    }

    public List<LinkedHashMap<String,Object>> selectAlumniComment(int AlumniId){
        return alumniMapper.selectAlumniComment(AlumniId);
    }
}
